<template>
	<view class="page-content">
		<u-sticky zIndex="99">
			<view class="bg_fff" style="padding: 20rpx;">
				<u-tabs :list="typeList" @click="typeClick" lineColor="#333333" keyName="name"
					:activeStyle="{fontWeight: 'bold',color: '#333333',transform: 'scale(1.3)'}"
					:inactiveStyle="{color: '#999999', transform: 'scale(1.2)'}" scrollable="false"></u-tabs>
			</view>
		</u-sticky>
		<!-- <template v-if="typeFlag=='add'">
			<template v-if="flag=='zhihu_huiyuan'">
				<zhihu-huiyuan-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</zhihu-huiyuan-keyword>
			</template>
			<template v-if="flag=='zhihu_laxin'">
				<zhihu-laxin-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</zhihu-laxin-keyword>
			</template>
			<template v-if="flag=='fanqie_xiaoshuo'">
				<fanqie-xiaoshuo-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</fanqie-xiaoshuo-keyword>
			</template>
			<template v-if="flag=='fanqie_changting'">
				<fanqie-changting-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</fanqie-changting-keyword>
			</template>
			<template v-if="flag=='zuiyou'">
				<zuiyou-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id"></zuiyou-keyword>
			</template>
			<template v-if="flag=='uc_gushihui'">
				<uc-gushihui-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</uc-gushihui-keyword>
			</template>

			<template v-if="flag=='uc_laxin'">
				<uc-laxin-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</uc-laxin-keyword>
			</template>
			<template v-if="flag=='kuake'">
				<kuake-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</kuake-keyword>
			</template>
			<template v-if="flag=='xunleiwangpan'">
				<xunleiwangpan-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</xunleiwangpan-keyword>
			</template>
			<template v-if="flag=='shuqi'">
				<shuqi-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id">
				</shuqi-keyword>
			</template>
		</template>
		<template v-else>
			<back-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id"></back-keyword>
		</template> -->
		<template v-if="typeFlag=='add'">
			<comm-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id" :flag="flag">
			</comm-keyword>
		</template>
		<template v-else>
			<back-keyword style="display: flex;flex-direction: column;flex:1" :missionId="id"></back-keyword>
		</template>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				typeList: [{
					flag: "add",
					name: "新增"
				}, {
					flag: "keyword",
					name: "词库"
				}],
				typeFlag: "add",
				id: "",
				flag: ""
			}
		},
		onLoad(op) {
			this.id = op.id;
			this.flag = op.flag;
		},
		methods: {
			typeClick(item) {
				this.typeFlag = item.flag
			},
			onReachBottom(e) {
				uni.$emit('onReachBottom', e); //传递参数
			},
			onPullDownRefresh(e) {
				uni.stopPullDownRefresh();
			},
		}
	}
</script>

<style scoped>
	/deep/ .selected-area.placeholder {
		color: #c0c4cc !important;
		font-size: 15px !important;
		text-align: right;
	}

	/deep/ .input-value.input-value-border {
		height: 24px !important;
		padding: 0px !important;
		border: none;
	}
</style>
